home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer 6.2
/
2000-12_-_Disc_6.2.iso
/
Patches
/
age2upa.exe
/
CABFILE
/
FILESUSA.CAB
/
Data
/
gamedata.drs
/
Unnamed File 000023.bina
< prev
next >
Wrap
Text File
|
1999-11-11
|
46KB
|
2,445 lines
;goals 1 and 2 = boats
;goal 3 = groups
;goal combat-arm = his unique unit type (also loads correct upgrades)
;goal 36 = good infantry -- 36 NO = don't build, YES = build,
; 2 = only build if we don't have a castle.
;goal 37 = good cavalry
;goal 38 = good horse-archers
;goal 39 = good archers
;starting loads
;*********************************************************
;*********************************************************
#load-if-defined BRITON-CIV
;train longbows, champs, lt cav
(defrule
(goal combat-arm NOTICE)
=>
(set-goal combat-arm ARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 2)
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 25)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(goal combat-arm 1)
(goal combat-arm 5)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
)
#end-if
;*********************************************************
#load-if-defined BYZANTINE-CIV
;train cataphracts, hvy HA, arbalests, handgunners
(defrule
(true)
=>
(set-goal combat-arm CAVALRY)
(set-goal 36 YES)
(set-goal 37 2)
(set-goal 38 YES)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 35)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 10)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(or
(can-train hand-cannoneer)
(can-train arbalest)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train hand-cannoneer)
(train arbalest)
(set-goal secondary-build 0)
)
#end-if
;************************************************
#load-if-defined CELTIC-CIV
;train woad raiders, paladins, lt cav, hvy HA, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 YES)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 4)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train paladin)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train paladin)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(or
(current-age < imperial-age)
(not (can-afford-unit paladin) )
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 4)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;********************************
#load-if-defined CHINESE-CIV
;train chu-ko-nu, champs, light cav, hvy scorps;
(defrule
(true)
=>
(set-goal combat-arm ARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 2)
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 25)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;*******************************
#load-if-defined FRANKISH-CIV
;train throwing-axe, paladins, lt cav, hvy HA, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 YES)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 4)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train paladin)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train paladin)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(or
(current-age < imperial-age)
(not (can-afford-unit paladin) )
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 4)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;****************************
#load-if-defined GOTHIC-CIV
;train huskarls, lt cav, hvy HA, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;********************************
#load-if-defined JAPANESE-CIV
;train samurai, hvy HA, arbalests, hand-cannoneer, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(or
(can-train hand-cannoneer)
(can-train arbalest)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train hand-cannoneer)
(train arbalest)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;*********************************
#load-if-defined MONGOL-CIV
;trains mangudai, champs
(defrule
(true)
=>
(set-goal combat-arm CAVARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 2)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 35)
(set-strategic-number sn-food-gatherer-percentage 25)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
#end-if
;***********************************
#load-if-defined PERSIAN-CIV
;trains elephants, hvy HA
(defrule
(true)
=>
(set-goal combat-arm CAVALRY)
(set-goal 36 NO)
(set-goal 37 YES)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
#end-if
;***********************************
#load-if-defined SARACEN-CIV
;trains mamluks, hvy HA, arbalests, hand cannoneers
(defrule
(true)
=>
(set-goal combat-arm CAVALRY)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 45)
(set-strategic-number sn-gold-gatherer-percentage 30)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train heavy-cavalry-archer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-cavalry-archer)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(or
(can-train hand-cannoneer)
(can-train arbalest)
)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train hand-cannoneer)
(train arbalest)
(set-goal secondary-build 0)
)
#end-if
;*********************************
#load-if-defined TEUTONIC-CIV
;trains TK, paladins, hvy scorps
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 YES)
(set-goal 38 NO)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 2)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train paladin)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train paladin)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;************************************
#load-if-defined TURKISH-CIV
;trains janissaries, champs, lt cav, hvy scorp
(defrule
(true)
=>
(set-goal combat-arm ARCHER)
(set-goal 36 YES)
(set-goal 37 NO)
(set-goal 38 YES)
(set-goal 39 NO)
(set-strategic-number sn-wood-gatherer-percentage 25)
(set-strategic-number sn-food-gatherer-percentage 35)
(set-strategic-number sn-gold-gatherer-percentage 35)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train champion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train champion)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;********************************
#load-if-defined VIKING-CIV
;trains berserks, lt cav, arbalests, hvy scorp
(defrule
(true)
=>
(set-goal combat-arm INFANTRY)
(set-goal 36 2)
(set-goal 37 NO)
(set-goal 38 NO)
(set-goal 39 YES)
(set-strategic-number sn-wood-gatherer-percentage 20)
(set-strategic-number sn-food-gatherer-percentage 50)
(set-strategic-number sn-gold-gatherer-percentage 25)
(set-strategic-number sn-stone-gatherer-percentage 5)
(disable-self)
)
(defrule
(goal secondary-build 1)
=>
(generate-random-number 3)
)
(defrule
(goal secondary-build 1)
(random-number == 1)
(can-train light-cavalry)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train light-cavalry)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 2)
(can-train arbalest)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train arbalest)
(set-goal secondary-build 0)
)
(defrule
(goal secondary-build 1)
(random-number == 3)
(can-train heavy-scorpion)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train heavy-scorpion)
(set-goal secondary-build 0)
)
#end-if
;*********************************************************
;*********************************************************
#load-if-defined DIFFICULTY-EASIEST
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 10)
(set-strategic-number sn-consecutive-idle-unit-limit 60)
(set-strategic-number sn-easiest-reaction-percentage 20)
(set-difficulty-parameter ability-to-maintain-distance 100)
(set-difficulty-parameter ability-to-dodge-missiles 100)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-EASY
(load "petersen tower")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 25)
(set-strategic-number sn-consecutive-idle-unit-limit 20)
(set-strategic-number sn-easier-reaction-percentage 20)
(set-strategic-number sn-hits-before-alliance-change 50)
(set-difficulty-parameter ability-to-maintain-distance 75)
(set-difficulty-parameter ability-to-dodge-missiles 75)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-MODERATE
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 75)
(set-strategic-number sn-consecutive-idle-unit-limit 5)
(set-strategic-number sn-hits-before-alliance-change 25)
(set-difficulty-parameter ability-to-maintain-distance 50)
(set-difficulty-parameter ability-to-dodge-missiles 50)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARD
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 99)
(set-strategic-number sn-consecutive-idle-unit-limit 1)
(set-strategic-number sn-hits-before-alliance-change 10)
(set-difficulty-parameter ability-to-maintain-distance 0)
(set-difficulty-parameter ability-to-dodge-missiles 0)
(disable-self)
)
#end-if
;********************************
#load-if-defined DIFFICULTY-HARDEST
(load "petersen tower")
(load "petersen wonder")
(defrule
(true)
=>
(set-strategic-number sn-percent-enemy-sighted-response 99)
(set-strategic-number sn-hits-before-alliance-change 10)
(set-difficulty-parameter ability-to-maintain-distance 0)
(set-difficulty-parameter ability-to-dodge-missiles 0)
(disable-self)
)
#end-if
;********************************
;********************************
(defrule
(true)
=>
(set-goal military-parity YES) ;goal 3
(set-goal attack-control NO) ;goal 4
(set-goal need-deathmatch-villagers NO) ;goal 7
(set-goal secondary-build 0) ;goal 8
(set-goal soldiers-available NO);goal 10
(set-goal combat-arm NOTICE) ;goal 11
(set-goal age-advancement NO) ;goal 14
(set-goal make-warboat NO) ;goal 15
(set-goal upgrade-conflict NO) ;goal 16
(disable-self)
)
(defrule
(true)
=>
(set-goal pre-unique-arm NO) ;goal 17
(set-goal wonder-attempt MAYBE) ;goal 20
(set-goal enemy-soldiers NO) ;goal 26
(set-goal siege-available YES) ;goal 34
(disable-self)
)
(defrule
(cc-players-building-type-count any-enemy castle == 0)
=>
(set-goal rush-control RUSHING)
)
(defrule
(goal rush-control RUSHING)
(cc-players-building-type-count every-enemy castle > 0)
=>
(set-goal rush-control NO)
)
;========================DARK AGE RULES
(defrule
(true)
=>
(set-strategic-number sn-coop-share-information 1)
(set-strategic-number sn-coop-share-attacking 1)
(set-strategic-number sn-maximum-town-size imperial-town-size)
(set-strategic-number sn-task-ungrouped-soldiers 0)
(set-strategic-number sn-zero-priority-distance 250)
(set-strategic-number sn-blot-exploration-map 0)
(set-strategic-number sn-attack-intelligence 1)
(set-strategic-number sn-gather-defense-units 1)
(set-strategic-number sn-defense-distance 2)
(set-strategic-number sn-maximum-gaia-attack-response 1)
(set-strategic-number sn-ignore-attack-group-under-attack 1)
(set-strategic-number sn-allow-civilian-defense 0)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-stone-dropsite-distance 3)
(set-strategic-number sn-gold-dropsite-distance 3)
(set-strategic-number sn-retask-gather-amount 20)
(set-strategic-number sn-camp-max-distance 15)
(set-strategic-number sn-mill-max-distance 15)
(set-strategic-number sn-enemy-sighted-response-distance 15)
(set-strategic-number sn-group-form-distance 10)
(set-strategic-number sn-town-defend-priority 7)
(set-strategic-number sn-gold-defend-priority 2)
(set-strategic-number sn-stone-defend-priority 3)
(set-strategic-number sn-forage-defend-priority 0)
(disable-self)
)
(defrule
(true)
=>
(set-strategic-number sn-relic-defend-priority 0)
(set-strategic-number sn-cap-civilian-gatherers 100)
(set-strategic-number sn-percent-civilian-gatherers 0)
(set-strategic-number sn-minimum-civilian-explorers 0)
(set-strategic-number sn-cap-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-cap-civilian-builders 12)
(set-strategic-number sn-percent-civilian-builders 100)
(disable-self)
)
(defrule
(game-time > 600)
=>
(set-strategic-number sn-blot-exploration-map 1)
(disable-self)
)
(defrule
(building-type-count siege-workshop >= 3)
(building-type-count castle >= 3)
(or
(or
(wood-amount < 5000)
(food-amount < 5000)
)
(or
(gold-amount < 2000)
(stone-amount < 700)
)
)
=>
(set-strategic-number sn-percent-civilian-builders 15)
(set-strategic-number sn-percent-civilian-gatherers 85)
(enable-timer t-lumbercamp 1)
(disable-self)
)
(defrule
(strategic-number sn-percent-civilian-gatherers == 85)
(or
(or
(wood-amount < 500)
(food-amount < 500)
)
(or
(gold-amount < 500)
(stone-amount < 100)
)
)
=>
(set-strategic-number sn-percent-civilian-builders 10)
(set-strategic-number sn-percent-civilian-gatherers 90)
(disable-self)
)
; villager count
(defrule
(can-train villager)
(or
(or
(civilian-population < 6)
(and
(current-age == feudal-age)
(civilian-population < 8)
)
)
(or
(and
(current-age == castle-age)
(civilian-population < 10)
)
(and
(current-age == imperial-age)
(civilian-population < civ-dark-rush)
)
)
)
=>
(train villager)
)
(defrule
(strategic-number sn-percent-civilian-gatherers == 90)
(civilian-population < civ-castle)
(can-train villager)
=>
(train villager)
)
(defrule
(building-type-count-total lumber-camp > 0)
(idle-farm-count == 0)
(sheep-and-forage-too-far)
(can-build farm)
=>
(build farm)
)
;*********************************
;age advancement
(defrule
(can-research feudal-age)
(or
(players-current-age every-human >= feudal-age)
(difficulty <= moderate)
)
=>
(research feudal-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 140)
)
(defrule
(current-age == feudal-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(can-research castle-age)
(or
(players-current-age every-human >= castle-age)
(difficulty <= moderate)
)
=>
(research castle-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 170)
)
(defrule
(current-age == castle-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(can-research imperial-age)
(or
(difficulty <= moderate)
(and
(players-current-age every-human == imperial-age)
(difficulty == easy)
)
)
=>
(research imperial-age)
(set-goal age-advancement NOTICE)
(enable-timer t-ageup 200)
)
(defrule
(difficulty <= moderate)
(current-age == imperial-age)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
(disable-self)
)
(defrule
(goal age-advancement NOTICE)
(or
(current-age < imperial-age)
(and
(current-age < imperial-age)
(difficulty <= easy)
)
)
(timer-triggered t-ageup)
=>
(disable-timer t-ageup)
(set-goal age-advancement NO)
)
;*********************************
;buildings
(defrule
(difficulty <= moderate)
(building-type-count-total house <= fifteen-percent-pop)
(can-build house)
=>
(build house)
)
#load-if-defined DIFFICULTY-EASIEST
(defrule
(military-population < 10)
(housing-headroom < 5)
(population-headroom > 0)
(can-build house)
=>
(build house)
)
#end-if
#load-if-defined DIFFICULTY-EASY
(defrule
(military-population < civ-dark-rush)
(housing-headroom < 5)
(population-headroom > 0)
(can-build house)
=>
(build house)
)
#end-if
(defrule
(strategic-number sn-gold-gatherer-percentage > 0)
(building-type-count mining-camp == 0)
(resource-found gold)
(can-build mining-camp)
=>
(build mining-camp)
)
(defrule
(strategic-number sn-wood-gatherer-percentage > 0)
(building-type-count lumber-camp == 0)
(can-build lumber-camp)
=>
(build lumber-camp)
)
(defrule
(current-age == imperial-age)
(building-type-count siege-workshop > 0)
(building-type-count castle > 0)
(building-type-count town-center < 3)
(can-build town-center)
=>
(build town-center)
)
;build the following after running low on resources
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(timer-triggered t-lumbercamp)
(resource-found gold)
(resource-found stone)
(or
(dropsite-min-distance gold > 7)
(dropsite-min-distance stone > 7)
)
(can-build town-center)
=>
(build town-center)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(timer-triggered t-lumbercamp)
(resource-found wood)
(dropsite-min-distance wood > 7)
(can-build town-center)
=>
(build town-center)
)
(defrule
(timer-triggered t-lumbercamp)
=>
(disable-timer t-lumbercamp)
(enable-timer t-lumbercamp 60)
)
(defrule
(building-type-count-total mill == 0)
(building-type-count-total market == 0)
(can-build mill)
=>
(build mill)
)
(defrule
(building-type-count-total market == 0)
(can-build market)
=>
(build market)
)
(defrule
(building-type-count-total blacksmith < 2)
(can-build blacksmith)
=>
(build blacksmith)
)
(defrule
(building-type-count-total university == 0)
(can-build university)
=>
(build university)
)
(defrule
(building-type-count-total monastery < 3)
(can-build monastery)
=>
(build monastery)
)
(defrule
(can-build barracks)
(building-type-count-total barracks < 2)
=>
(build barracks)
)
(defrule
(building-type-count-total barracks == 2)
(unit-type-count villager > 6)
(can-build barracks)
=>
(build-forward barracks)
)
(defrule
(building-type-count-total archery-range < 2)
(can-build archery-range)
=>
(build archery-range)
)
(defrule
(building-type-count-total archery-range == 2)
(unit-type-count villager > 6)
(can-build archery-range)
=>
(build-forward archery-range)
)
(defrule
(building-type-count-total stable < 2)
(can-build stable)
=>
(build stable)
)
(defrule
(building-type-count-total stable == 2)
(unit-type-count villager > 6)
(can-build stable)
=>
(build-forward stable)
)
(defrule
(building-type-count-total siege-workshop < 2)
(can-build siege-workshop)
=>
(build siege-workshop)
)
(defrule
(building-type-count-total siege-workshop > 1)
(building-type-count-total siege-workshop < 4)
(unit-type-count villager > 6)
(can-build siege-workshop)
=>
(build-forward siege-workshop)
)
(defrule
(building-type-count-total castle < 3)
(can-build castle)
=>
(build castle)
)
(defrule
(building-type-count-total castle > 2)
(building-type-count-total castle < 5)
(unit-type-count villager > 6)
(can-build castle)
=>
(build-forward castle)
)
(defrule
(or
(and
(goal 1 1)
(building-type-count-total dock < 2)
)
(and
(goal 1 10)
(building-type-count-total dock < 4)
)
)
(can-build dock)
=>
(build dock)
)
;*********************************************************
;DIPLOMACY
#load-if-not-defined TEAMS-LOCKED
(defrule
(current-age >= feudal-age)
(players-stance any-computer-ally neutral)
=>
(set-stance this-any-computer-ally neutral)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-ally enemy)
=>
(set-stance this-any-computer-ally enemy)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-neutral ally)
=>
(set-stance this-any-computer-neutral ally)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-neutral enemy)
=>
(set-stance this-any-computer-neutral enemy)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-enemy ally)
=>
(set-stance this-any-computer-enemy ally)
)
(defrule
(current-age >= feudal-age)
(players-stance any-computer-enemy neutral)
=>
(set-stance this-any-computer-enemy neutral)
)
#end-if
;*****************************************
;*****************************************
;UPGRADES
(defrule
(can-research my-unique-unit-upgrade)
=>
(research my-unique-unit-upgrade)
)
;DOCK
(defrule
(not (goal 1 0) )
(can-research ri-war-galley)
=>
(research ri-war-galley)
)
(defrule
(not (goal 1 0) )
(can-research ri-galleon)
=>
(research ri-galleon)
)
(defrule
(not (goal 1 0) )
(can-research ri-fast-fire-ship)
=>
(research ri-fast-fire-ship)
)
(defrule
(not (goal 1 0) )
(goal military-parity NO)
(can-research ri-heavy-demolition-ship)
=>
(research ri-heavy-demolition-ship)
)
(defrule
(not (goal 1 0) )
(can-research ri-cannon-galleon)
=>
(research ri-cannon-galleon)
)
(defrule
(not (goal 1 0) )
(can-research ri-deck-guns)
=>
(research ri-deck-guns)
)
;BARRACKS UPGRADES
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-man-at-arms)
=>
(research ri-man-at-arms)
)
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-long-swordsman)
=>
(research ri-long-swordsman)
)
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-two-handed-swordsman)
=>
(research ri-two-handed-swordsman)
)
(defrule
(or
(goal 36 YES)
(and
(building-type-count castle == 0)
(goal 36 2)
)
)
(can-research ri-champion)
=>
(research ri-champion)
)
(defrule
(unit-type-count spearman > 0)
(can-research ri-pikeman)
=>
(research ri-pikeman)
)
;STABLE
(defrule
(or
(goal 37 YES)
(and
(building-type-count castle == 0)
(goal 37 2)
)
)
(can-research ri-cavalier)
=>
(research ri-cavalier)
)
(defrule
(or
(goal 37 YES)
(and
(building-type-count castle == 0)
(goal 37 2)
)
)
(can-research ri-paladin)
=>
(research ri-paladin)
)
(defrule
(can-research ri-light-cavalry)
=>
(research ri-light-cavalry)
)
(defrule
(unit-type-count camel > 0)
(can-research ri-heavy-camel)
=>
(research ri-heavy-camel)
)
;ARCHERY RANGE
(defrule
(or
(goal 38 YES)
(and
(building-type-count castle == 0)
(goal 38 2)
)
)
(can-research ri-heavy-cavalry-archer)
=>
(research ri-heavy-cavalry-archer)
)
(defrule
(or
(goal 39 YES)
(and
(building-type-count castle == 0)
(goal 39 2)
)
)
(can-research ri-crossbow)
=>
(research ri-crossbow)
)
(defrule
(or
(goal 39 YES)
(and
(building-type-count castle == 0)
(goal 39 2)
)
)
(can-research ri-arbalest)
=>
(research ri-arbalest)
)
(defrule
(or
(goal 39 YES)
(and
(building-type-count castle == 0)
(goal 39 2)
)
)
(can-research ri-hand-cannon)
=>
(research ri-hand-cannon)
)
(defrule
(unit-type-count skirmisher > 0)
(can-research ri-elite-skirmisher)
=>
(research ri-elite-skirmisher)
)
;SIEGE EQUIPMENT
(defrule
(or
(goal combat-arm INFANTRY)
(goal combat-arm ARCHER)
)
(can-research ri-heavy-scorpion)
=>
(research ri-heavy-scorpion)
)
(defrule
(can-research ri-capped-ram)
(or
(or
(cc-players-building-type-count any-enemy town-center > 2)
(cc-players-building-type-count any-enemy keep > 1)
)
(or
(cc-players-building-type-count any-enemy bombard-tower > 0)
(cc-players-building-type-count any-enemy castle > 0)
)
)
=>
(research ri-capped-ram)
)
(defrule
(or
(or
(cc-players-building-type-count any-enemy town-center > 2)
(cc-players-building-type-count any-enemy keep > 3)
)
(or
(cc-players-building-type-count any-enemy bombard-tower > 1)
(cc-players-building-type-count any-enemy castle > 2)
)
)
(can-research ri-siege-ram)
=>
(research ri-siege-ram)
)
(defrule
(can-research ri-onager)
=>
(research ri-onager)
)
(defrule
(can-research ri-siege-onager)
=>
(research ri-siege-onager)
)
(defrule
(can-research ri-bombard-cannon)
=>
(research ri-bombard-cannon)
)
;*********************************************************
;UNIT PRODUCTION
(defrule
(or
(or
(wood-amount < 5000)
(food-amount < 5000)
)
(or
(gold-amount < 2000)
(stone-amount < 700)
)
)
=>
(set-goal need-deathmatch-villagers YES)
(disable-self)
)
(defrule
(building-type-count castle == 0)
(can-train militiaman-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 36 NO) )
=>
(train militiaman-line)
)
(defrule
(building-type-count castle == 0)
(can-train knight-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 37 NO) )
=>
(train knight-line)
)
(defrule
(building-type-count castle == 0)
(can-train cavalry-archer-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 38 NO) )
=>
(train cavalry-archer-line)
)
(defrule
(building-type-count castle == 0)
(can-train archer-line)
(not (unit-available hand-cannoneer) )
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 39 NO) )
=>
(train archer-line)
)
(defrule
(building-type-count castle == 0)
(can-train hand-cannoneer)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
(not (goal 39 NO) )
=>
(train hand-cannoneer)
)
(defrule
(can-train my-unique-unit-line)
(or
(population < deathmatch-unit-max)
(and
(population < unit-max)
(goal need-deathmatch-villagers NO)
)
)
=>
(train my-unique-unit-line)
(set-goal secondary-build 1)
)
; monks
(defrule
(unit-type-count my-unique-unit-line > ten-percent-pop)
(unit-type-count-total monk == 0)
(or
(or
(civ-selected celtic)
(civ-selected gothic)
)
(or
(or
(civ-selected mongol)
(civ-selected persian)
)
(civ-selected viking)
)
)
(can-train monk)
=>
(train monk)
)
(defrule
(unit-type-count my-unique-unit-line > ten-percent-pop)
(unit-type-count-total monk < five-percent-pop)
(or
(or
(civ-selected chinese)
(civ-selected frankish)
)
(civ-selected turkish)
)
(can-train monk)
=>
(train monk)
)
(defrule
(unit-type-count my-unique-unit-line > ten-percent-pop)
(unit-type-count-total monk < ten-percent-pop)
(or
(civ-selected briton)
(or
(or
(civ-selected byzantine)
(civ-selected japanese)
)
(or
(civ-selected saracen)
(civ-selected teutonic)
)
)
)
(can-train monk)
=>
(train monk)
)
;*********************************************
;BLACKSMITH
;first level upgrades
(defrule
(can-research ri-forging)
(nand
(goal 36 NO)
(goal 37 NO)
)
=>
(research ri-forging)
)
(defrule
(can-research ri-fletching)
(or
(nand
(goal 38 NO)
(goal 39 NO)
)
(or
(building-type-count-total watch-tower > 0)
(unit-type-count-total war-galley > 0)
)
)
=>
(research ri-fletching)
)
(defrule
(can-research ri-padded-archer-armor)
(nand
(goal 38 NO)
(goal 39 NO)
)
=>
(research ri-padded-archer-armor)
)
(defrule
(can-research ri-scale-mail)
(not (goal 36 NO) )
=>
(research ri-scale-mail)
)
(defrule
(can-research ri-scale-barding)
(not (goal 37 NO) )
=>
(research ri-scale-barding)
)
;second upgrades
(defrule
(can-research ri-iron-casting)
(nand
(goal 36 NO)
(goal 37 NO)
)
=>
(research ri-iron-casting)
)
(defrule
(can-research ri-bodkin-arrow)
(or
(nand
(goal 38 NO)
(goal 39 NO)
)
(or
(building-type-count-total watch-tower > 0)
(unit-type-count-total war-galley > 0)
)
)
=>
(research ri-bodkin-arrow)
)
(defrule
(can-research ri-leather-archer-armor)
(nand
(goal 38 NO)
(goal 39 NO)
)
=>
(research ri-leather-archer-armor)
)
(defrule
(can-research ri-chain-mail)
(not (goal 36 NO) )
=>
(research ri-chain-mail)
)
(defrule
(can-research ri-chain-barding)
(not (goal 37 NO) )
=>
(research ri-chain-barding)
)
;third upgrades
(defrule
(can-research ri-blast-furnace)
(nand
(goal 36 NO)
(goal 37 NO)
)
=>
(research ri-blast-furnace)
)
(defrule
(can-research ri-bracer)
(or
(nand
(goal 38 NO)
(goal 39 NO)
)
(or
(building-type-count-total watch-tower > 0)
(unit-type-count-total war-galley > 0)
)
)
=>
(research ri-bracer)
)
(defrule
(can-research ri-ring-archer-armor)
(nand
(goal 38 NO)
(goal 39 NO)
)
=>
(research ri-ring-archer-armor)
)
(defrule
(can-research ri-plate-mail)
(not (goal 36 NO) )
=>
(research ri-plate-mail)
)
(defrule
(can-research ri-tracking)
(not (goal 36 NO) )
=>
(research ri-tracking)
)
(defrule
(can-research ri-squires)
(not (goal 36 NO) )
=>
(research ri-squires)
)
(defrule
(can-research ri-plate-barding)
(not (goal 37 NO) )
=>
(research ri-plate-barding)
)
(defrule
(can-research ri-husbandry)
(not (goal 37 NO) )
=>
(research ri-husbandry)
)
;SIEGE RESEARCH ITEMS
(defrule
(can-research ri-siege-engineers)
=>
(research ri-siege-engineers)
)
(defrule
(can-research ri-hoardings)
=>
(research ri-hoardings)
)
(defrule
(not (goal 1 0) )
(can-research ri-heated-shot)
=>
(research ri-heated-shot)
)
(defrule
(building-type-count-total watch-tower > 2)
(can-research ri-guard-tower)
=>
(research ri-guard-tower)
)
(defrule
(building-type-count-total guard-tower > 2)
(can-research ri-keep)
=>
(research ri-keep)
)
(defrule
(can-research ri-bombard-tower)
=>
(research ri-bombard-tower)
)
(defrule
(goal wall-build YES)
(can-research ri-fortified-wall)
=>
(research ri-fortified-wall)
)
;SHIPS
(defrule
(not (goal 1 0) )
(can-research ri-careening)
=>
(research ri-careening)
)
(defrule
(not (goal 1 0) )
(can-research ri-dry-dock)
=>
(research ri-dry-dock)
)
(defrule
(not (goal 1 0) )
(can-research ri-shipwright)
=>
(research ri-shipwright)
)
;OTHER RESEARCH ITEMS
(defrule
(can-research ri-ballistics)
=>
(research ri-ballistics)
)
(defrule
(can-research ri-chemistry)
=>
(research ri-chemistry)
)
(defrule
(can-research ri-conscription)
=>
(research ri-conscription)
)
;***********************************
;ECONOMIC UPGRADES
;***********************************
;mining-camp items
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-gold-mining)
=>
(research ri-gold-mining)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-gold-shaft-mining)
=>
(research ri-gold-shaft-mining)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(research-completed ri-gold-mining)
(can-research ri-stone-mining)
=>
(research ri-stone-mining)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(research-completed ri-gold-shaft-mining)
(can-research ri-stone-shaft-mining)
=>
(research ri-stone-shaft-mining)
)
;university stuff
(defrule
(can-research ri-masonry)
=>
(research ri-masonry)
)
(defrule
(can-research ri-architecture)
=>
(research ri-architecture)
)
(defrule
(can-research ri-stonecutting)
=>
(research ri-stonecutting)
)
;market & town center
(defrule
(can-research ri-town-watch)
=>
(research ri-town-watch)
)
(defrule
(can-research ri-town-patrol)
=>
(research ri-town-patrol)
)
(defrule
(player-in-game any-ally)
(can-research ri-cartography)
=>
(research ri-cartography)
)
(defrule
(can-research ri-guilds)
=>
(research ri-guilds)
)
(defrule
(current-age == imperial-age)
(can-research ri-loom)
=>
(research ri-loom)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-wheel-barrow)
=>
(research ri-wheel-barrow)
)
(defrule
(strategic-number sn-percent-civilian-gatherers >= 85)
(can-research ri-hand-cart)
=>
(research ri-hand-cart)
)
(defrule
(player-in-game any-ally)
(can-research ri-coinage)
=>
(research ri-coinage)
)
(defrule
(player-in-game any-ally)
(can-research ri-banking)
=>
(research ri-banking)
)
;monk upgrades
(defrule
(can-research ri-faith)
(or
(cc-players-unit-type-count any-enemy monk > five-percent-pop)
(cc-players-unit-type-count any-enemy monk > 5)
)
=>
(research ri-faith)
)
(defrule
(difficulty <= moderate)
(can-research ri-atonement)
(or
(cc-players-unit-type-count any-enemy monk > five-percent-pop)
(cc-players-unit-type-count any-enemy monk > 5)
)
=>
(research ri-atonement)
)
(defrule
(can-research ri-block-printing)
(unit-type-count monk > five-percent-pop)
=>
(research ri-block-printing)
)
(defrule
(can-research ri-illumination)
(unit-type-count monk > 1)
=>
(research ri-illumination)
)
(defrule
(can-research ri-fervor)
(unit-type-count monk > 1)
=>
(research ri-fervor)
)
(defrule
(difficulty <= moderate)
(can-research ri-redemption)
(unit-type-count monk > five-percent-pop)
=>
(research ri-redemption)
)
(defrule
(can-research ri-sanctity)
(unit-type-count monk > 1)
=>
(research ri-sanctity)
)
;***********************************
;MARKET STUFF
;***********************************
(defrule
(wood-amount > 5000)
(commodity-selling-price wood >= 20)
(can-sell-commodity wood)
=>
(chat-local-to-self "abuse market; sell wood")
(sell-commodity wood)
)
(defrule
(food-amount > 5000)
(commodity-selling-price food >= 20)
(can-sell-commodity food)
=>
(chat-local-to-self "abuse market; sell food")
(sell-commodity food)
)
(defrule
(gold-amount < 1200)
(wood-amount > 5000)
(can-sell-commodity wood)
=>
(chat-local-to-self "need gold; sell wood")
(sell-commodity wood)
)
(defrule
(gold-amount < 1200)
(food-amount > 5000)
(can-sell-commodity food)
=>
(chat-local-to-self "need gold; sell food")
(sell-commodity food)
)
(defrule
(gold-amount < 1200)
(stone-amount > 1000)
(building-type-count-total castle >= 5)
(can-sell-commodity stone)
=>
(chat-local-to-self "need gold; sell stone")
(sell-commodity stone)
)
(defrule
(stone-amount < 650)
(gold-amount > 5000)
(building-type-count-total castle < 5)
(can-buy-commodity stone)
=>
(chat-local-to-self "need stone")
(buy-commodity stone)
)
(defrule
(wood-amount < 1100)
(gold-amount > 5000)
(can-buy-commodity wood)
=>
(chat-local-to-self "need wood")
(buy-commodity wood)
)
(defrule
(food-amount < 1600)
(gold-amount > 5000)
(can-buy-commodity food)
=>
(chat-local-to-self "need food")
(buy-commodity food)
)